package org.dtrd.modules.drug.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.drug.entity.po.DtrdExtEmsYwDrugs;

import java.util.Date;

/**
 * @author QR
 * @since 2021-12-02
 */
@Getter
@Setter
@ApiModel(value = "列表展示的药品数据对象")
public class DrugListInfo {

    private Integer dataId;

    @ApiModelProperty("药品名称")
    private String drugName;

    @ApiModelProperty("所属分类")
    private Integer drugCategoryid;

    @ApiModelProperty("所属分类名字")
    private String drugCategoryName;

    @ApiModelProperty("药品图片")
    private String drugThumb;

    @ApiModelProperty("主要成分（及其化学名称）")
    private String drugComponent;

    @ApiModelProperty("创建时间")
    private Date drugCreateTime;

    @ApiModelProperty("药材库标签")
    private String drugTips;

    @ApiModelProperty("药材库标签")
    private String drugSpec;


    public DrugListInfo parseFromPo(DtrdExtEmsYwDrugs po) {
        dataId = po.getDataId();
        drugCategoryid = po.getDrugCategoryid();
        drugName = po.getDrugName();
        drugThumb = po.getDrugThumb();
        drugComponent = po.getDrugComponent();
        drugCreateTime = po.getDrugCreateTime();
        drugTips = po.getDrugTips();
        drugSpec=po.getDrugSpec();
        return this;
    }
}
